maintainer="Hugo Osvaldo Barrera <hugo@whynothugo.nl>"
pkgname=transito
pkgver=0.8.1
pkgrel=0
pkgdesc="Public transportation planner"
url="https://git.sr.ht/~mil/transito"
arch="all !armv7 !armhf"
license="GPLv3-or-later"
makedepends="
	go
	sqlite-dev
	libxcursor-dev
	libxkbcommon-dev
	libxkbcommon-x11
	mesa-egl
	vulkan-headers
	wayland-dev
	mesa-dev
	"
depends="xdg-utils tzdata mesa-gles"
subpackages="$pkgname-doc"
source="transito-$pkgver.tar.gz::https://git.sr.ht/~mil/transito/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"
options="!check net"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	sh build.sh blinux
}

package() {
	sed -i "s#/usr/#$pkgdir/usr/#g" build.sh
	sh build.sh install

	cd doc
	find . -type f -exec install -Dm 644 {} "$pkgdir/usr/share/doc/transito/{}" \;
}

sha512sums="
2933e93494a9fc7989b4f8091e3f18c03b4c599ceedb7570f7e8d4c48f2f28cd9c2b65f7b7eba1478662e61bd2d14d26f9642f784fc6c0ee3fabc0446f9218cd  transito-0.8.1.tar.gz
"
